IOMMU VTD BUG: disable Extended Interrupt Mode when disabling Interupt
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 15 Jun 2011 15:07:45 +0000 (16:07 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 15 Jun 2011 15:07:45 +0000 (16:07 +0100)
commit46f391252bc3d6b7ff65f60fea631bf018226c91
tree4686d23d24d8165accfae1ee74a7c3b25d434c97
parentbfb9f7deda04698c30e6b671bf7069e8b5fbb75f
IOMMU VTD BUG: disable Extended Interrupt Mode when disabling Interupt
Remapping

Experimental evidence shows that Extended Interrupt Mode remains in
effect even after Interrupt Remapping is disabled in each DMAR Global
Command Register.  A consiquence of this is that when we switch from
x2apic mode back to xapic mode, and disable interrupt remapping for
the kdump kernel, interrupts passing through the IO APICs are in
x2apic format as opposed xapic.  This causes a triple fault in the
kexec kernel.

As EIM is explicitly set up each time Interrup Remapping is enabled,
it is safe for us to clobber this when taring down.

Also, change the header definition of IRTA_REG_EIME_SHIFT.  It caused
verbose and error-prone code, and was only used in 1 place before.  We
now have IRTA_EIME which is the specific bit in the register.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/drivers/passthrough/vtd/intremap.c
xen/drivers/passthrough/vtd/iommu.h